// SPDX-FileCopyrightText: 2025 UnionTech Software Technology Co., Ltd.
// SPDX-License-Identifier: MIT

package metrics

import (
        "strconv"
        "strings"
)

type Config struct {
        SocketPath    string
}

func ParseFloat(value string) (float64, error) {
        return strconv.ParseFloat(strings.TrimSpace(value), 64)
}

func SplitAndTrim(input, sep string) []string {
        if input == "" {
                return []string{}
        }

        parts := strings.Split(input, sep)
        for i := range parts {
                parts[i] = strings.TrimSpace(parts[i])
        }
        return parts
}

